<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--系统管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrapSwitch.css">
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/chioce.css">
    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="__STATIC_URL__/static/js/bootstrapSwitch.js"></script>
</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ul class="breadcrumb">
                <li>当前位置是&nbsp;:</li>
                <li><a href="javascript:history.back();">系统设置</a></li>
                <li class="active" style="color: #02b87f;">系统用户管理</li>
            </ul>
        </div>
        <div class="panel mgr15 mgl15">
            <div class="panel-heading addCharts" style="background:#ededed;">
                用户详情
            </div>
            <div class="panel-body">
                <form class="form-horizontal adminex-form" action='' method="post" id="sysuser" enctype="multipart/form-data">
                    <div class="form-group" id="ferror5">
                        <label class="col-sm-2 control-label">用户角色：</label>
                        <div class="col-sm-10">
                            <select class="form-control" name='level' id='level' style="width:70%;">
                                {volist name="dice" id="level"}
                                <option value='{$level.value}' {if condition="$info['level'] eq $level['value']"}selected{/if}>{$level.text}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group" id="ferror1" >
                        <label class="col-sm-2 col-sm-2 control-label">姓名：</label>
                        <div class="col-sm-10">
                            <input type="hidden" class="form-control" name="id" id='id'   value="{$info['id']}" style="width:70%;background: #fff;">
                            <input type="text" class="form-control" name="xingming" id='xingming'   value="{$info['xingming']}" style="width:70%;background: #fff;">
                        </div>
                    </div>
                    <div class="form-group" id="ferror3" >
                        <label class="col-sm-2 col-sm-2 control-label">手机号：</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id='tel' name='tel' style="width:70%;" value="{$info['tel']}" autocomplete="off" disableautocomplete>
                        </div>
                    </div>
                    <div class="form-group" id="ferror7" >
                        <label class="col-sm-2 col-sm-2 control-label">账号：</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="帐号不可进行修改"  readonly="readonly" id='username'  autocomplete="off" disableautocomplete value="{$info['username']}" style="width:70%;background: #fff;">
                        </div>
                    </div>
                    <div class="form-group" id="ferror2">
                        <label class="col-sm-2 col-sm-2 control-label">密码：</label>
                        <div class="col-sm-10">
                            <input type="password" id='password' name='password' class="form-control" style="width:70%;background: #fff;" autocomplete="off" disableautocomplete   readonly onfocus="this.removeAttribute('readonly');">
                        </div>
                    </div>
                    <div class="form-group" id="ferror8">
                        <label class="col-sm-2 control-label">隶属OEM商：</label>
                        <div class="col-sm-10">
                            <select class="form-control" name='sysid' id='sysid' style="width:70%;" required>
                                {volist name="oemlist" id="level"}
                                <option value='{$level.id}' {if condition="$info['sysid'] eq $level['id']"}selected{/if}>{$level.gs_name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div style="text-align: center">
                        <button type="button" onclick="addform()" class="btn btn-primary">确认修改</button>
                    </div>
                </form>
            </div>
        </div>
        {include file='public/footer'/}

    </div>
</section>
<script src="__STATIC_URL__/static/layer/layer.js"></script>
<script>
    function addform() {
        var username = $('#username').val();
        var tel = $("#tel").val();
        var xingming = $("#xingming").val();
        var xingming = $("#xingming").val();
        var sysid = $("#sysid").val();
        var level = $("#level").val();
        if(sysid==""){
            layer.alert('请选择隶属OEM商');
            $('#sysid').focus();
            return;

        }
        if(level==""){
            layer.alert('请选择用户角色');
            $('#level').focus();
            return;

        }
        if(xingming==""){
            layer.alert('姓名不能为空');
            $('#xingming').focus();
            return;
        }
        if(tel==""){
            layer.alert('手机号不能为空');
            $('#tel').focus();
            return;
        }
        if (username === '') {
            layer.alert('用户名不能为空');
            $('#username').focus();
            return;
        }

        $('#sysuser').submit();

    }
</script>
</body>
</html>
